package com.hp.ecs.xqa.util.orm;

import java.util.Set;

import org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean;

/**
 * @author water 2007-9-21
 */
public class AnnotationSessionFactory extends AnnotationSessionFactoryBean {

	public void setAnnotatedPackages(String[] annotatedPackages) {
		ResolverUtil resovlerUtil = new ResolverUtil();
		resovlerUtil.findAnnotated(javax.persistence.Entity.class, annotatedPackages);
		Set<Class> set = resovlerUtil.getClasses();
		Class[] voClasses = new Class[set.size()];
		set.toArray(voClasses);
		super.setAnnotatedClasses(voClasses);
	}
}
